package com.ibeetl.admin.core.web;

import com.ibeetl.admin.core.entity.CoreOrg;
import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.service.CorePlatformService;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName AuthorizedBaesController
 * @Description: 控制器基类
 * @author: tanbaocai
 * @date: 2018/10/19 10:33
 */
public class AuthorizedBaesController {
	public CoreUser getLoginUser(HttpServletRequest request) {
		return (CoreUser) request.getSession().getAttribute(CorePlatformService.ACCESS_CURRENT_USER);
	}

	public CoreOrg getLoginUserOrg(HttpServletRequest request) {
		return (CoreOrg) request.getSession().getAttribute(CorePlatformService.ACCESS_CURRENT_ORG);
	}
}
